<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="public::head('投票表决')">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="UTF-8"></meta>

</head>
<body style="padding-top:50px;">
<input type="hidden" th:value="${session.Id}" id="id"/>
<input type="hidden" th:value="${session.Type}" id="Type"/>

<div th:replace="public/top_vote::top"></div>

<div id="Votelist">

    <div class="primary-title">
        <div style="margin-top:15px;text-align: center;font-size:24px">
            <label  style="margin-left: 20px; ">{{xiangmu.xiangmuname}}</label>
        </div>
        <div style="text-align: center;font-size:18px">
            <label  style="margin-left: 20px; ">总数： {{total}} 同意： <font color="green">{{tongyishu}}</font> 不同意： <font color="red">{{butongyishu}}</font></label>
        </div>
        <div>

            <input type="button" class="btn btn-sm btn-danger" style="margin-right: 10px;float: right" value="全不同意" @click="toVoteAll(0)">
            <input type="button" class="btn btn-sm btn-success" style="margin-right: 10px;float: right" value="全同意" @click="toVoteAll(1)">
        </div>
    </div>


    <div class="primary-content">

        <table class="table table-hover table-striped">
            <thead>
            <th colspan="7" style="text-align:center;vertical-align:middle;">科室现使用耗材</th>
            <th colspan="5" style="text-align:center;vertical-align:middle;">科室拟更换耗材</th>
            </thead>
            <thead>
            <th style="text-align:center;vertical-align:middle;">序号</th>
            <th style="text-align:center;vertical-align:middle;">需求科室</th>
            <th style="text-align:center;vertical-align:middle;">耗材编号</th>
            <th style="text-align:center;vertical-align:middle;width: 100px;">名称</th>
            <th style="text-align:center;vertical-align:middle;width: 200px;">规格</th>
            <th style="text-align:center;vertical-align:middle;width: 100px;">生产厂家</th>
            <th style="text-align:center;vertical-align:middle;width: 100px;">单价</th>
            <th style="text-align:center;vertical-align:middle;width: 100px;">名称</th>
            <th style="text-align:center;vertical-align:middle;width: 200px;">规格</th>
            <th style="text-align:center;vertical-align:middle;width: 100px;">生产厂家</th>
            <th style="text-align:center;vertical-align:middle;width: 100px;">单价</th>
            <th style="text-align:center;vertical-align:middle;">中标信息（中标编码）</th>
            <th style="text-align:center;vertical-align:middle;width:160px;">表决建议</th>
            </thead>
            <tbody>
            <tr v-for="(voteitem,index) in votelist" v-if="show">
                <td style="text-align:center;vertical-align:middle;" v-text="index+1"></td>
                <td style="text-align:center;vertical-align:middle;" v-text="voteitem.xuqiukeshi"></td>
                <td style="text-align:center;vertical-align:middle;" v-text="voteitem.haocaibianhao"></td>
                <td style="text-align:center;vertical-align:middle;" v-text="voteitem.xianyong_mingcheng"></td>
                <td style="text-align:center;vertical-align:middle;" v-text="voteitem.xianyong_guige"></td>
                <td style="text-align:center;vertical-align:middle;" v-text="voteitem.xianyong_shengchanchangjia"></td>
                <td style="text-align:center;vertical-align:middle;" v-text="voteitem.xianyong_danjia"></td>
                <td style="text-align:center;vertical-align:middle;" v-text="voteitem.nigeng_mingcheng"></td>
                <td style="text-align:center;vertical-align:middle;" v-text="voteitem.nigeng_guige"></td>
                <td style="text-align:center;vertical-align:middle;" v-text="voteitem.nigeng_shengchanchangjia"></td>
                <td style="text-align:center;vertical-align:middle;" v-text="voteitem.nigeng_danjia"></td>
                <td style="text-align:center;vertical-align:middle;" v-text="voteitem.zhongbiaoxinxi"></td>

                <td style="text-align:center;vertical-align:middle;" >
                    <div style="text-align: center" :id="'jieguo'+voteitem.id">
                        <span v-if="voteitem.result==null" style="color:blue">未表决</span>
                        <span v-if="voteitem.result==0" style="color:red">不同意</span>
                        <span v-if="voteitem.result==1" style="color:green">同意</span>
                    </div>
                    <div style="text-align:center;">
                        <input type="button" class="btn btn-sm btn-success" style="margin-left: 10px;float: left" value="同意" @click="toVote(voteitem.id,1)">
                        <input type="button" class="btn btn-sm btn-danger" style="margin-left: 10px;float: left" value="不同意" @click="toVote(voteitem.id,0)">

                    </div>




                </td>
            </tr>

            </tbody>
        </table>
        <div v-if="!show" style="text-align:center;width:100%;">暂无数据</div>


    </div>



</div>

</body>
<script th:src="@{/js/vote/list_zhuankeyinjin_vote.js}"></script>

<script type="text/javascript">
    var ID = $("#id").val();
    $(function() {
        if(ID==""){
            alert("请先登录！");
            location.href='../main/login';
        }
    });
</script>
</html>